<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8" />
    <title>字符串运算符</title>
    <script>
        /*
           +
           +=
           完成字符串拼接
           字符串和任何类型做拼接都是字符串
        */

        var str = "hello";
        /* var str2 = str + "world";
        console.log(str2); */

        /* var str2 = str + 100;
        console.log(str2);
        console.log(typeof str2); */

        str += "world"; // str = str + "world"
        console.log(str);


    </script>
</head>

<body>
</body>